<?php
	$title = 'User Table';
	$this->headTitle($title);
	
?>

<h1><?php echo $this->escapeHtml($title); ?></h1>
<p>
	<a href="<?php echo $this->url('user/process', array('controller'=>'index', 'action'=>'add'));?>">Add new user</a>
</p>

<table class="table">
	<tr>
		<th>Ho Ten</th>
		<th>Username</th>
		<th>Email</th>
		<th>State</th>
		<th></th>
	</tr>
	<?php foreach ($this->userArray as $user) : ?>
	<tr>
		<td><?php echo $this->escapeHtml($user->getDisplay_name());?></td>
		<td><?php echo $this->escapeHtml($user->getUsername());?></td>
		<td><?php echo $this->escapeHtml($user->getEmail());?></td>
		<td><?php echo $this->escapeHtml($user->getState());?></td>
		<td>
			<a href="<?php echo $this->url('user/process', array('controller' => 'index', 'action' => 'detail'), array('query' => array('id' => $user->getId())) ); ?>">Detail</a> |
			<a href="<?php //echo $this->url('album',	array('action'=>'edit', 'id' => $album->id));?>">Edit</a> |
			<a href="<?php //echo $this->url('album', array('action'=>'delete', 'id' => $album->id));?>">Delete</a>
		</td>
		
	</tr>
	<?php endforeach; ?>
</table>

<?php echo ( count($this->userArray) > 0 ) ? $this->paginationControl($this->userArray, 'Sliding', 'pager.phtml') : ""; ?>